﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using SharedLib.WinFormMVCFramework;

namespace TracyGUI.View
{
    public partial class FormInProgress : WinFormViewBase
    {
        public FormInProgress(string title, string text)
        {
            InitializeComponent();
            Text = title;
            labelMessage.Text = text;
            buttonCancel.Text = Tracy.TracyFacade.Instance.LanguageManager.GetText("CancelButtonText");
            DialogResult = System.Windows.Forms.DialogResult.OK;
        }

        private void buttonCancel_Click(object sender, EventArgs e)
        {
            DialogResult = System.Windows.Forms.DialogResult.Cancel;
        }

        public void HideForm()
        {
            InvokeOnUIThread(() =>
            {
                Hide();
            });
        }
    }
}
